﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ws="clr-namespace:Creventive.Wpf.ShellFactory.Workspace">

	<Style TargetType="{x:Type ws:ApplicationViewContainerWindow}">
		<Setter Property="Background" Value="White" />
		<Setter Property="Padding" Value="16" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ws:ApplicationViewContainerWindow}">
					<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
						<Grid>
							<ws:SingleViewWorkspace x:Name="PART_Workspace" Grid.Row="0" Source="{TemplateBinding Source}" Margin="{TemplateBinding Padding}" />
							<ResizeGrip HorizontalAlignment="Right" x:Name="WindowResizeGrip" VerticalAlignment="Bottom" IsTabStop="False" Visibility="Collapsed" Grid.Row="1" />
						</Grid>
					</Border>

					<ControlTemplate.Triggers>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="ResizeMode" Value="CanResizeWithGrip" />
								<Condition Property="WindowState" Value="Normal" />
							</MultiTrigger.Conditions>
							<Setter Property="Visibility" TargetName="WindowResizeGrip" Value="Visible" />
						</MultiTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>